package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;
import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * 林地指标平台_合同模板 实体类。
 *
 * @author 11987
 * @since 2025-05-31
 */
@Table(value = "LINDI_CONTRACT_TEMPLATE", onInsert = InsertFullColumnHandler.class, onUpdate = UpdateFullColumnHandler.class)
public class LindiContractTemplate extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 合同模板ID
     */
    private Long contractTemplateId;

    /**
     * 模板名称
     */
    private String contractTemplateName;

    /**
     * 模板类型
     */
    private String contractTemplateType;

    /**
     * 状态  0禁用 1正常
     */
    private Byte status;

    /**
     * 模板描述
     */
    private String contractDescription;

    /**
     * 合同模板文件ID
     */
    private Long contractTemplateFileId;

    public LindiContractTemplate() {
    }

    public LindiContractTemplate(Long contractTemplateId, String contractTemplateName, String contractTemplateType, Byte status, String contractDescription, Long contractTemplateFileId) {
        this.contractTemplateId = contractTemplateId;
        this.contractTemplateName = contractTemplateName;
        this.contractTemplateType = contractTemplateType;
        this.status = status;
        this.contractDescription = contractDescription;
        this.contractTemplateFileId = contractTemplateFileId;
    }

    public Long getContractTemplateId() {
        return contractTemplateId;
    }

    public void setContractTemplateId(Long contractTemplateId) {
        this.contractTemplateId = contractTemplateId;
    }

    public String getContractTemplateName() {
        return contractTemplateName;
    }

    public void setContractTemplateName(String contractTemplateName) {
        this.contractTemplateName = contractTemplateName;
    }

    public String getContractTemplateType() {
        return contractTemplateType;
    }

    public void setContractTemplateType(String contractTemplateType) {
        this.contractTemplateType = contractTemplateType;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public String getContractDescription() {
        return contractDescription;
    }

    public void setContractDescription(String contractDescription) {
        this.contractDescription = contractDescription;
    }

    public Long getContractTemplateFileId() {
        return contractTemplateFileId;
    }

    public void setContractTemplateFileId(Long contractTemplateFileId) {
        this.contractTemplateFileId = contractTemplateFileId;
    }

    public static LindiContractTemplateBuilder builder() {
        return new LindiContractTemplateBuilder();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiContractTemplate that = (LindiContractTemplate) o;
        return Objects.equals(contractTemplateId, that.contractTemplateId) &&
               Objects.equals(contractTemplateName, that.contractTemplateName) &&
               Objects.equals(contractTemplateType, that.contractTemplateType) &&
               Objects.equals(status, that.status) &&
               Objects.equals(contractDescription, that.contractDescription) &&
               Objects.equals(contractTemplateFileId, that.contractTemplateFileId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), contractTemplateId, contractTemplateName, contractTemplateType, status, contractDescription, contractTemplateFileId);
    }

    @Override
    public String toString() {
        return "LindiContractTemplate{" +
                "contractTemplateId=" + contractTemplateId +
                ", contractTemplateName='" + contractTemplateName + '\'' +
                ", contractTemplateType='" + contractTemplateType + '\'' +
                ", status=" + status +
                ", contractDescription='" + contractDescription + '\'' +
                ", contractTemplateFileId=" + contractTemplateFileId +
                '}';
    }

    public static class LindiContractTemplateBuilder {
        private Long contractTemplateId;
        private String contractTemplateName;
        private String contractTemplateType;
        private Byte status;
        private String contractDescription;
        private Long contractTemplateFileId;

        public LindiContractTemplateBuilder contractTemplateId(Long contractTemplateId) {
            this.contractTemplateId = contractTemplateId;
            return this;
        }

        public LindiContractTemplateBuilder contractTemplateName(String contractTemplateName) {
            this.contractTemplateName = contractTemplateName;
            return this;
        }

        public LindiContractTemplateBuilder contractTemplateType(String contractTemplateType) {
            this.contractTemplateType = contractTemplateType;
            return this;
        }

        public LindiContractTemplateBuilder status(Byte status) {
            this.status = status;
            return this;
        }

        public LindiContractTemplateBuilder contractDescription(String contractDescription) {
            this.contractDescription = contractDescription;
            return this;
        }

        public LindiContractTemplateBuilder contractTemplateFileId(Long contractTemplateFileId) {
            this.contractTemplateFileId = contractTemplateFileId;
            return this;
        }

        public LindiContractTemplate build() {
            return new LindiContractTemplate(contractTemplateId, contractTemplateName, contractTemplateType, status, contractDescription, contractTemplateFileId);
        }
    }

}
